<script lang="ts">
import { h } from 'vue'

export default {
  __TAB__: true,
  props: ['title', '__keyIdx', '__activeIdx'],
  setup(props, { slots }) {
    return () => {
      const children = slots.default?.() || []
      return h(
        'div',
        {
          style: {
            display: props.__activeIdx.value === props.__keyIdx ? 'block' : 'none'
          }
        },
        children
      )
    }
  }
}
</script>
